/*
 * @Author: your name
 * @Date: 2021-08-07 23:51:20
 * @LastEditTime: 2021-08-11 20:39:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Self\hrsaas-86\src\api\departments.js
 */
import request from '@/utils/request'
export const reqGetDepartments = () => {
  return request({
    url: '/company/department'
  })
}

export function reqDelDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

export function reqAddDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
/**
 *
 * @param {*} id  查看部门详情信息接口
 * @returns
 */
export function reqGetDepartDetail(id) {
  return request({
    url: '/company/department/' + id
  })
}

export function reqUpdateDepartments(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'put',
    data
  })
}
